package com.tcode.bean;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * Created by Administrator on 2019/5/27.
 */
@Document(indexName = "j5501",type = "emp",shards = 3,replicas = 1)
public class UserBean {
    @Field(type = FieldType.Integer)
    @Id
    private int uid;
    @Field(type = FieldType.Text,analyzer = "ik_smart")
    private String uname;
    @Field(type = FieldType.Keyword)
    private String phone;
    @Field(type = FieldType.Integer)
    private int sal;

    @Override
    public String toString() {
        return "UserBean{" +
                "uid=" + uid +
                ", uname='" + uname + '\'' +
                ", phone='" + phone + '\'' +
                ", sal=" + sal +
                '}';
    }

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public String getUname() {
        return uname;
    }

    public void setUname(String uname) {
        this.uname = uname;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public int getSal() {
        return sal;
    }

    public void setSal(int sal) {
        this.sal = sal;
    }
}
